package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.execption.GmallException;
import com.atguigu.gmall.common.result.ResultCodeEnum;
import com.atguigu.gmall.model.enums.ProcessStatus;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2025/8/28 23:49
 */
@RestController
@RequestMapping("/admin/product")
public class HelloController {

    @RequestMapping("/hello/{id}")
    public String hello(@PathVariable("id") Integer id){
        if (id %2==0){
            throw new RuntimeException("id不能为偶数");
        }else {
            throw new GmallException(ResultCodeEnum.SECKILL_END);
        }

    }
}
